# coding=utf-8
# 0 for normal RES_SUCC
# 1 for normal RES_FAIL
# start from 2
RES_SUCC = 0x0
RES_FAIL = 0x1

EXCEPTION_SERVICE_NUM_CONSTRAINT = 0x2
EXCEPTION_SERVICE_NO_SUCH_ADDON_SERVICE = 0x3
EXCEPTION_SERVICE_GET_USEABLE_PORT_LIST_FAILED = 0x4
EXCEPTION_SERVICE_ALLOCATE_PORT_FAILED = 0x5
EXCEPTION_SERVICE_OPERATE_RUNNING_ADDON = 0x6
EXCEPTION_SERVICE_OPERATE_STOPPED_ADDON = 0x7
EXCEPTION_SERVICE_NO_SUC_ADDON_CTRL_CMD = 0x8
EXCEPTION_SERVICE_BUILTINADDON_PORT_DUPLICATED = 0x9
EXCEPTION_SERVICE_BUILTINADDON_OP_FAILED = 0xA
EXCEPTION_SERVICE_OPERATE_INVALID_ADDON = 0xB

EXCEPTION_SERVICE_CONVERT_FAILED = 0x58  # addon转换失败
EXCEPTION_SERVICE_CONVERT_JSON_READ_FAILED = 0x59  # 转换时老addon json文件读取失败
EXCEPTION_SERVICE_CONVERT_CHECK_FAILED = 0x5A  # 转换时addon版本校验出错

EXCEPTION_SERVICE_CONFIG_FILE_INVALID = 0x1000
EXCEPTION_SERVICE_CONFIG_FILE_MISS_REQUIRED = 0x1001
EXCEPTION_SERVICE_CONFIG_FILE_ERR_PORT = 0x1002
EXCEPTION_SERVICE_CONFIG_FILE_ERR_LANGUAGE = 0x1003
EXCEPTION_SERVICE_CONFIG_FILE_ERR_TYPE = 0x1004
EXCEPTION_SERVICE_CONFIG_FILE_ERR_SERVICEENABLE = 0x1005
EXCEPTION_SERVICE_CONFIG_FILE_ERR_SERVICE = 0x1006
EXCEPTION_SERVICE_CONFIG_FILE_ERR_NAME = 0x1007
EXCEPTION_SERVICE_CONFIG_FILE_ERR_DESCRIPTION = 0x1008
EXCEPTION_SERVICE_CONFIG_FILE_ERR_URL = 0x1009
EXCEPTION_SERVICE_CONFIG_FILE_ERR_CONVENTION = 0x100A

EXCEPTION_SERVICE_INSTALL_PACKAGE_NOT_EXIST = 0x2000
EXCEPTION_SERVICE_INSTALL_PACKAGE_MOVE_FAILED = 0x2001
EXCEPTION_SERVICE_INSTALL_PACKAGE_UNCOMPRESS_FAILED = 0x2002
EXCEPTION_SERVICE_INSTALL_PACKAGE_THREAD_IS_BUSY = 0x2003
EXCEPTION_SERVICE_INSTALL_PACKAGE_NO_INSTALL_TASK = 0x2004
EXCEPTION_SERVICE_INSTALL_PACKAGE_COMPRESS_FAILED = 0x2005
EXCEPTION_SERVICE_INSTALL_PACKAGE_TIMEOUT = 0x2006
EXCEPTION_SERVICE_INSTALL_PACKAGE_WRONG_FORMAT = 0x2007

__all__ = [
    "RES_SUCC",
    "RES_FAIL",
    "EXCEPTION_SERVICE_NUM_CONSTRAINT",
    "EXCEPTION_SERVICE_NO_SUCH_ADDON_SERVICE",
    "EXCEPTION_SERVICE_GET_USEABLE_PORT_LIST_FAILED",
    "EXCEPTION_SERVICE_ALLOCATE_PORT_FAILED",
    "EXCEPTION_SERVICE_OPERATE_RUNNING_ADDON",
    "EXCEPTION_SERVICE_OPERATE_STOPPED_ADDON",
    "EXCEPTION_SERVICE_NO_SUC_ADDON_CTRL_CMD",
    "EXCEPTION_SERVICE_BUILTINADDON_PORT_DUPLICATED",
    "EXCEPTION_SERVICE_BUILTINADDON_OP_FAILED",
    "EXCEPTION_SERVICE_OPERATE_INVALID_ADDON",
    "EXCEPTION_SERVICE_CONVERT_FAILED",
    "EXCEPTION_SERVICE_CONVERT_JSON_READ_FAILED",
    "EXCEPTION_SERVICE_CONVERT_CHECK_FAILED",
    "EXCEPTION_SERVICE_CONFIG_FILE_INVALID",
    "EXCEPTION_SERVICE_CONFIG_FILE_MISS_REQUIRED",
    "EXCEPTION_SERVICE_CONFIG_FILE_ERR_PORT",
    "EXCEPTION_SERVICE_CONFIG_FILE_ERR_LANGUAGE",
    "EXCEPTION_SERVICE_CONFIG_FILE_ERR_TYPE",
    "EXCEPTION_SERVICE_CONFIG_FILE_ERR_SERVICEENABLE",
    "EXCEPTION_SERVICE_CONFIG_FILE_ERR_SERVICE",
    "EXCEPTION_SERVICE_CONFIG_FILE_ERR_NAME",
    "EXCEPTION_SERVICE_CONFIG_FILE_ERR_DESCRIPTION",
    "EXCEPTION_SERVICE_CONFIG_FILE_ERR_URL",
    "EXCEPTION_SERVICE_CONFIG_FILE_ERR_CONVENTION",
    "EXCEPTION_SERVICE_INSTALL_PACKAGE_NOT_EXIST",
    "EXCEPTION_SERVICE_INSTALL_PACKAGE_MOVE_FAILED",
    "EXCEPTION_SERVICE_INSTALL_PACKAGE_UNCOMPRESS_FAILED",
    "EXCEPTION_SERVICE_INSTALL_PACKAGE_THREAD_IS_BUSY",
    "EXCEPTION_SERVICE_INSTALL_PACKAGE_NO_INSTALL_TASK",
    "EXCEPTION_SERVICE_INSTALL_PACKAGE_COMPRESS_FAILED",
    "EXCEPTION_SERVICE_INSTALL_PACKAGE_TIMEOUT",
    "EXCEPTION_SERVICE_INSTALL_PACKAGE_WRONG_FORMAT",
]
